package zheezes.protocol.impl.wt.du;

import zheezes.protocol.impl.wt.DataUnit;

public class Ctrl1EDi0247DataUnit extends DataUnit {
	private int seq = 0;

	@Override
	public int getData(byte[] buf, int offset) {
		int idx = offset;
		buf[idx++] = (byte) seq;
		return idx - offset;
	}

	@Override
	public int setData(byte[] buf, int offset, int max) {
		int idx = offset;
		seq = buf[idx++];
		return idx - offset;
	}

	@Override
	public int sizeOfData() {
		return 1;
	}

	public int getSeq() {
		return seq;
	}

	public void setSeq(int seq) {
		this.seq = seq;
	}
}
